package cn.congzhou.crm.query;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter@Setter@ToString
public class CustomerQueryObject extends QueryObject {

    private Integer[] status={0,1,2};
    private Long sellerId;//显示当前用户的客户
    private Integer year;
    private Integer month;


    public String getDate(){
        if (year == null || year == -1){
            return null;
        }
        StringBuilder sb = new StringBuilder();
        sb.append(year);
        if (month != null && month != -1){
            if(month < 10){
                sb.append("0");//月份前面拼接0
            }
            sb.append(month);
        }
        return sb.toString();
    }

    public String getDateFormat(){
        if (year == null || year == -1){
            return null;
        }
        StringBuilder sb = new StringBuilder();
        sb.append("%Y");
        if (month != null && month != -1){
            sb.append("%m");
        }
        return sb.toString();
    }

}
